﻿@using AP.Framework.Infrastructure.Repositories
@using AP.Framework.Infrastructure.Database
@{
    ApContext context = new ApContext();
    ArticleCategoryRepository artCategory = new ArticleCategoryRepository(context);
    var artCategoryList = artCategory.GetAll().OrderBy(p => p.Sequence).ToList();
}
@{
    ViewBag.Title = "新闻动态";
    Layout = "~/Views/Shared/_Web960Layout.cshtml";
}
@model IEnumerable<AP.Framework.Infrastructure.Entities.cms_Article>
<div class="grid_5">
    <div class="index-sider">
        <div class="section-wrap index-news">
            <div class="section-title section-mark">
                <em style="color: #1EA4E3">栏目导航</em></div>
            <div class="section-content">
                <ul class="links-list">
                    @{
                        foreach (var list in artCategoryList)
                        {
                        <li><a href="@Url.Action("Index", "News", new { area = "", categoryId = list.ID })" class="title">@list.Name</a>
                            <span class="time">&gt;&gt;</span></li>
                        }                    
                    }
                </ul>
            </div>
        </div>
        @Html.Partial("_ContactPartial")
    </div>
</div>
<!-- end .grid_1 -->
<div class="grid_11">
    <div class="index-main">
        <div class="section-wrap index-news">
            <div class="section-title section-mark">
                <em style="color: #1EA4E3">新闻列表</em></div>
            <div class="section-content">
                <ul class="links-list" style="padding: 5px 5px">
                    @{
                        foreach (var artLsit in Model)
                        {
                        <li><a href="@Url.Action("ViewDetails", "News", new { articleId = artLsit.ID })">&gt;&gt;@artLsit.Title</a><span
                            class="time">@(artLsit.ModifyTime == null ? "" : artLsit.ModifyTime.Value.ToShortDateString())</span>
                        </li>
                        }                        
                    }
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- end .grid_15 -->
<div class="clear">
</div>
